#include "./WizInnerMutex.hpp"

//////////////////////////////////////////////////////////////////////////

#if (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_WINDOWS)
#include "./Windows/WizInnerWindowsMutex.hpp"
#elif (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_LINUX)
#endif /*WIZ_CFG_PLATFORM*/

namespace Wiz
{
    namespace Mutex
    {
        ::Wiz::Mutex::Ptr Create()
        {
#           if (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_WINDOWS)
            return new ::Wiz::Inner::Mutex::Windows::Mutex_t();
#           elif (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_LINUX)
            return new ::Wiz::Inner::Mutex::Linux::Mutex_t();
#           endif /*WIZ_CFG_PLATFORM*/
        }
        ::Wiz::Void::Type Destroy(::Wiz::Mutex::Ptr& p)
        {
#           if (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_WINDOWS)
            ::Wiz::SafeDelete2<::Wiz::Inner::Mutex::Windows::Mutex_t*>(p);
#           elif (WIZ_CFG_PLATFORM == WIZ_CFG_PLATFORM_LINUX)
            ::Wiz::SafeDelete2<::Wiz::Inner::Mutex::Linux::Mutex_t*>(p);
#           endif /*WIZ_CFG_PLATFORM*/
        }
    } /// end of namespace Mutex
} /// end of namespace Wiz

//////////////////////////////////////////////////////////////////////////
